/**
 * 
 */
package us.gaaoc.framework.dao;

import org.hibernate.Query;

import us.gaaoc.framework.model.Court;
import us.gaaoc.framework.model.LocalCourtEventType;

/**
 * 
 * @author hea
 * May 18, 2007
 */
public class LocalCourtEventTypeDAOHibernate extends GenericHibernateDAO<LocalCourtEventType, Integer, LocalCourtEventTypeDAO>
implements  LocalCourtEventTypeDAO{

	public LocalCourtEventType findLocalCourtEventType(Court court, int courtEventTypeCode) {
		Query q = this.getSession().createQuery("from LocalCourtEventType e where e.court = ? and e.courtEventType.code = ?");
		q.setEntity(0, court);
		q.setInteger(1, courtEventTypeCode);		
		return (LocalCourtEventType)q.uniqueResult();
	}
}
